using System;
using System.Collections.Generic;
using System.Text;
using Jbe.TestSuite.TestDevice.Manager.Interface.Services;
using Microsoft.Practices.CompositeUI;

namespace Jbe.TestSuite.TestDevice.Manager.Tests.Mocks
{
    public class MockDevice : IDevice
    {
        public event EventHandler Disconnected;

        public const string ProductNameConst = "TestProduct";
        public const string ManufactorerConst = "TestManufactorer";

        private string profileName = MockDeviceController.ProfileName;
        private WorkItem workItem;

        public string ProfileName
        {
            get { return profileName; }
            set { profileName = value; }
        }

        public string ProductName
        {
            get { return ProductNameConst; }
        }

        public string Manufacturer
        {
            get { return ManufactorerConst; }
        }

        public WorkItem WorkItem
        {
            get { return workItem; }
            set { workItem = value; }
        }

        public void Disconnect()
        {
            OnDisconnected();
        }

        public virtual void OnDisconnected()
        {
            if (Disconnected != null) { Disconnected(this, EventArgs.Empty); }
        }
    }
}
